<template>
  <div>
    <ep-advance-card class="m-b-20" theme="theme-1">
      <template slot="cardTitle">
        <span>简单表格</span>
        <div style="float: right">
          <ep-dropdown @item-click="handleItemClick" type="click" position="right">
            <i slot="item" class="ion-more"></i>
            <ep-dropdown-item item-key="1">删除</ep-dropdown-item>
            <ep-dropdown-item item-key="2">添加</ep-dropdown-item>
          </ep-dropdown>
        </div>
      </template>

      <ep-table size="small" :data="epData" border :header-cell-style="{ background: '#e6f2ff', fontWeight: 'normal' }">
        <ep-table-item column="id" title="ID"></ep-table-item>
        <ep-table-item column="name" title="姓名"></ep-table-item>
        <ep-table-item column="addr" title="地址"></ep-table-item>
      </ep-table>
      <ep-pager
        class="m-t-10 m-b-10"
        right
        :now-page="epPager.offset"
        :page-size="epPager.limit"
        :total-num="epDataTotal"
        @change="handlePageChange"
        @size-change="sizeChange"
      ></ep-pager>
    </ep-advance-card>
  </div>
</template>

<script>
import searchMixin from '@/common/mixins/searchMixin'
import { getTableData } from '../api'

export default {
  mixins: [searchMixin],
  data() {
    return {
      api: getTableData
    }
  },
  methods: {
    handleItemClick() {}
  }
}
</script>

<style></style>
